
<div class="wrap">

{if $smarty.cookies.message == null}
	<div id="ajaxResponse1" class="ajaxResponse"></div>
{else}
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:block">{$smarty.cookies.message}</div>
{/if}
<h2>{TranslateTag}B_LABEL_PRODUCT_GROUP{/TranslateTag}</h2>
	<p>
		<a href="?module={$smarty.get.module}&sub1={$smarty.get.sub1}&act=createproductgroup"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
	</p>
	<table class="widefat">
		<thead>
		<tr>
			<th class="point {if $smarty.get.by eq 'desc'}sortover{else}sortoverup{/if}"  scope="col" onclick="javascript:document.location='?module={$smarty.get.module}{if $smarty.get.sub1}&sub1={$smarty.get.sub1}{/if}&sort=product_group_id&by={if $smarty.get.by eq 'desc'}asc {else}desc{/if}'">{TranslateTag}B_LABEL_ID{/TranslateTag}</th>
	        <th class="point {if $smarty.get.by eq 'desc'}sortover{else}sortoverup{/if}"  scope="col" onclick="javascript:document.location='?module={$smarty.get.module}{if $smarty.get.sub1}&sub1={$smarty.get.sub1}{/if}&sort=product_group_name&by={if $smarty.get.by eq 'desc'}asc {else}desc{/if}'">{TranslateTag}B_LABEL_NAME{/TranslateTag}</th>
	        <th class="point {if $smarty.get.by eq 'desc'}sortover{else}sortoverup{/if}"  scope="col" onclick="javascript:document.location='?module={$smarty.get.module}{if $smarty.get.sub1}&sub1={$smarty.get.sub1}{/if}&sort=product_group_description&by={if $smarty.get.by eq 'desc'}asc {else}desc{/if}'">{TranslateTag}B_LABEL_DESCRIPTION{/TranslateTag}</th>
	        <th colspan="2" style="text-align: center">{TranslateTag}B_LABEL_ACTION{/TranslateTag}</th>
		</tr>
		</thead>
		<tbody id="productlisttable">
			{foreach name=productlist from=$ARR_PRODUCT_GROUP.data item=item}
				<tr id="{$item->product_group_id}" class="{cycle values=,alternate}">
					<th scope='row' style='text-align: center'>{$item->product_group_id}</th>
					<td><a href="?module={$smarty.get.module}&sub1=productgroup&submod=GetProductByPg&groupid={$item->product_group_id}">{$item->product_group_name}</td>
					<td>{$item->product_group_description}</td>
					<td><a href="?module={$smarty.get.module}&sub1=productgroup&act=editProductGroup&id={$item->product_group_id}" class='edit'><img src="../view/admin/images/object_edit.png" alt="Edit" /></td>
					<td><a onclick="onDeleteProductList('?module={$smarty.get.module}&sub1={$smarty.get.sub1}', '{$item->product_group_id}', 'ajaxResponse1')" class='delete'><img src="../view/admin/images/object_delete.png" alt="Delete" /></td>
				</tr>
			{/foreach}
		</tbody>
</table>
{if $ARR_PRODUCT_GROUP.data != NULL}
     <div>			
      <div style="width:300px; float:left"> 
          {TranslateTag}LABEL_PAGES{/TranslateTag} : {$ARR_PRODUCT_GROUP.TOTAL} {TranslateTag}LABEL_OF{/TranslateTag} {$ARR_PRODUCT_GROUP.TOTALDATA}
      </div>			
      <div style="text-align:right; float:right" >{$ARR_PRODUCT_GROUP.FIRST} {$ARR_PRODUCT_GROUP.PRE}&nbsp;{$ARR_PRODUCT_GROUP.LISTPAGE} {TranslateTag}LABEL_OF{/TranslateTag} &nbsp; {$ARR_PRODUCT_GROUP.TOTALPAGE} &nbsp;                   
          <select onchange="javascript:window.location='{$ARR_PRODUCT_GROUP.LINK}&{$ARR_PRODUCT_GROUP.PATHNAME}='+this.value">
            {$ARR_PRODUCT_GROUP.COMBOPAGE}                     
          </select>&nbsp;{$ARR_PRODUCT_GROUP.NEXT} {$ARR_PRODUCT_GROUP.LAST}         
      </div>
      <div style="clear:both"></div>		
    </div>	     
    {/if}
<p>
	<a href="?module={$smarty.get.module}&sub1={$smarty.get.sub1}&act=createproductgroup"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
</p>
</div>

